import React, { Component } from 'react';
import { NavBar} from 'antd-mobile'
import "./style.scss"
class Index extends Component {
    back(){
        this.props.history.goBack()
    }
    render() {
        const {location}=this.props
        const {url,title,desc,price}=location.state
        return (
            <div className='box'>
                <NavBar onBack={()=>this.back()}>详情</NavBar>
                <dl>
                    <dt><img src={url} alt="" /></dt>
                    <dd>
                        <h4>{title}</h4>
                        <p>{desc}</p>
                        <p>￥{price}</p>
                    </dd>
                </dl>
            </div>
        );
    }
}

export default Index;
